import config from "@/config";
import {ApiResult} from "@/utils/data";
import {post} from "@/utils/request";


/** 获取系统用户角色关联接口基地址 */
const getUrl = (url: string) => config.apiBaseUrl + '/sys/userRoleMap' + url;

/** 系统用户角色关联接口 */
const service = {
  /** 查询用户角色主键列表 */
  async selectMapRoleIds(userId: string): Promise<ApiResult<string>> {
    const data = {
      userId: userId,
    };
    return post(getUrl('/selectMapRoleIds'), data);
  },

  /** 查询用户角色列表 */
  async selectMapRoleList(userId :any){
    const data = {
      userId: userId,
    };
    return post(getUrl('/selectMapRoleList'), data);
  },
}
export default service;
